import request from '@/utils/request'

const api = {
  getCompanyDetail: '/manage/companyProfile/get', // 获取公司介绍详情
  updateCompanyInfo: '/manage/companyProfile/update', // 修改公司介绍

  addClient: '/manage/cooperativeCustomers/insert', // 添加合作客户
  deleteClient: '/manage/cooperativeCustomers/delete', //删除合作客户
  getClientList: '/manage/cooperativeCustomers/list', //获取合作客户列表
  updateClient: '/manage/cooperativeCustomers/update', // 修改合作客户

  getMenuTree: '/manage/menu/tree', //获取菜单树
  updateMenuTree: '/manage/menu/update', //更新菜单树
  addMenu: '/manage/menu/insert', // 新增菜单
  deleteMenu: '/manage/menu/delete', // 删除菜单

  deleteInformation: '/manage/dataDown/delete', //删除资料
  addInformation: '/manage/dataDown/insert', //新增资料
  getInformation: '/manage/dataDown/list', // 查询资料
  updateInformation: '/manage/dataDown/update', //更新资料

  deleteNews: '/manage/news/delete', // 删除新闻
  addNews: '/manage/news/insert', // 新增新闻
  getNewsList: '/manage/news/list', //新闻列表
  updateNews: '/manage/news/update', //修改新闻

  addProduct: '/manage/product/insert', // 新增产品
  deleteProduct: '/manage/product/delete', // 删除产品
  getProductList: '/manage/product/list', // 查询产品
  updatetProduct: '/manage/product/update', // 更新产品
  getProductImgs: '/manage/productImage/getProductImage', // 查询产品图片
  deleteProductImgs: '/manage/productImage/delete', //删除产品图片

  deleteUser: '/manage/user/delete', //删除用户
  addUser: '/manage/user/insert', // 新增用户
  getUserList: '/manage/user/list', // 用户列表
  resetUserPassword: '/manage/user/resetPassword', //重置密码
  updateUser: '/manage/user/update', // 修改用户
  updateUserPassword: '/manage/user/updatePassword', // 修改密码

  getHomePageList: '/manage/homeImage/list', // 获取首页
  updateHOmePageList: '/manage/homeImage/update', // 修改首页
  addHomePageInfo: '/manage/homeImage/insert', // 新增首页
  deleteHomPageInfo: '/manage/homeImage/delete', // 删除第一屏的轮播图

  addProductTrait: '/manage/productFeature/insert', // 添加产品特点
  updateProductTrait: '/manage/productFeature/update', // 更新产品特点
  deleteProductTrait: '/manage/productFeature/delete', //删除产品特点
  getProductTraitList: '/manage/productFeature/list', //查询产品特点

  getMessageList: '/manage/messageBoard/list', // 获取留言列表
  deleteMessageList: '/manage/messageBoard/delete', // 删除留言

  addChronicle: '/manage/memorabilia/insert', // 添加大事记
  deleteChronicle: '/manage/memorabilia/delete', // 删除大事记
  getChronicleList: '/manage/memorabilia/list', // 查询大事记
  updateChronicle: '/manage/memorabilia/update', // 修改大事记

  addTestCase: '/manage/case/insert', //添加检测案例
  getTestCaseList: '/manage/case/list', // 获取检测案例
  updateTestCase: '/manage/case/update', //修改检测案例
  deleteTestCase: '/manage/case/delete', //删除案例
}

export default api

export function getCompanyDetail (params) {
  return request({
    url: api.getCompanyDetail,
    method: 'get',
    params: params
  })
}
export function updateCompanyInfo (params) {
  return request({
    url: api.updateCompanyInfo,
    method: 'post',
    data: params
  })
}
export function addClient (params) {
  return request({
    url: api.addClient,
    method: 'post',
    data: params
  })
}
export function deleteClient (params) {
  return request({
    url: api.deleteClient,
    method: 'post',
    params: params
  })
}
export function updateClient (params) {
  return request({
    url: api.updateClient,
    method: 'post',
    data: params
  })
}
export function getClientList (params) {
  return request({
    url: api.getClientList,
    method: 'post',
    data: params
  })
}
export function getMenuTree (params) {
  return request({
    url: api.getMenuTree,
    method: 'post',
    data: params
  })
}
export function updateMenuTree (params) {
  return request({
    url: api.updateMenuTree,
    method: 'post',
    data: params
  })
}
export function addMenu (params) {
  return request({
    url: api.addMenu,
    method: 'post',
    data: params
  })
}

export function deleteInformation (params) {
  return request({
    url: api.deleteInformation,
    method: 'post',
    params: params
  })
}
export function addInformation (params) {
  return request({
    url: api.addInformation,
    method: 'post',
    data: params
  })
}
export function getInformation (params) {
  return request({
    url: api.getInformation,
    method: 'post',
    params: params
  })
}
export function updateInformation (params) {
  return request({
    url: api.updateInformation,
    method: 'post',
    data: params
  })
}
export function deleteNews (params) {
  return request({
    url: api.deleteNews,
    method: 'post',
    params: params
  })
}
export function addNews (params) {
  return request({
    url: api.addNews,
    method: 'post',
    data: params
  })
}
export function getNewsList (params) {
  return request({
    url: api.getNewsList,
    method: 'post',
    params: params
  })
}
export function updateNews (params) {
  return request({
    url: api.updateNews,
    method: 'post',
    data: params
  })
}
export function addProduct (params) {
  return request({
    url: api.addProduct,
    method: 'post',
    data: params
  })
}
export function deleteProduct (params) {
  return request({
    url: api.deleteProduct,
    method: 'post',
    params: params
  })
}
export function getProductList (params) {
  return request({
    url: api.getProductList,
    method: 'post',
    params: params
  })
}
export function updatetProduct (params) {
  return request({
    url: api.updatetProduct,
    method: 'post',
    data: params
  })
}
export function getProductImgs (params) {
  return request({
    url: api.getProductImgs,
    method: 'post',
    params: params
  })
}
export function deleteProductImgs (params) {
  return request({
    url: api.deleteProductImgs,
    method: 'post',
    params: params
  })
}

export function deleteUser (params) {
  return request({
    url: api.deleteUser,
    method: 'post',
    params: params
  })
}
export function addUser (params) {
  return request({
    url: api.addUser,
    method: 'post',
    data: params
  })
}
export function getUserList (params) {
  return request({
    url: api.getUserList,
    method: 'post',
    params: params
  })
}
export function resetUserPassword (params) {
  return request({
    url: api.resetUserPassword,
    method: 'post',
    params: params
  })
}
export function updateUser (params) {
  return request({
    url: api.updateUser,
    method: 'post',
    data: params
  })
}
export function updateUserPassword (params) {
  return request({
    url: api.updateUserPassword,
    method: 'post',
    data: params
  })
}
export function deleteMenu (params) {
  return request({
    url: api.deleteMenu,
    method: 'post',
    params: params
  })
}
export function getHomePageList (params) {
  return request({
    url: api.getHomePageList,
    method: 'post',
    params: params
  })
}
export function updateHOmePageList (params) {
  return request({
    url: api.updateHOmePageList,
    method: 'post',
    data: params
  })
}
export function addHomePageInfo (params) {
  return request({
    url: api.addHomePageInfo,
    method: 'post',
    data: params
  })
}
export function deleteHomPageInfo (params) {
  return request({
    url: api.deleteHomPageInfo,
    method: 'post',
    params: params
  })
}
export function getProductTraitList (params) {
  return request({
    url: api.getProductTraitList,
    method: 'post',
    params: params
  })
}
export function deleteProductTrait (params) {
  return request({
    url: api.deleteProductTrait,
    method: 'post',
    params: params
  })
}
export function updateProductTrait (params) {
  return request({
    url: api.updateProductTrait,
    method: 'post',
    data: params
  })
}
export function addProductTrait (params) {
  return request({
    url: api.addProductTrait,
    method: 'post',
    data: params
  })
}
export function getMessageList (params) {
  return request({
    url: api.getMessageList,
    method: 'post',
    params: params
  })
}
export function deleteMessageList (params) {
  return request({
    url: api.deleteMessageList,
    method: 'post',
    params: params
  })
}

export function addChronicle (params) {
  return request({
    url: api.addChronicle,
    method: 'post',
    data: params
  })
}
export function deleteChronicle (params) {
  return request({
    url: api.deleteChronicle,
    method: 'post',
    params: params
  })
}
export function getChronicleList (params) {
  return request({
    url: api.getChronicleList,
    method: 'post',
    params: params
  })
}
export function updateChronicle (params) {
  return request({
    url: api.updateChronicle,
    method: 'post',
    data: params
  })
}
export function getTestCaseList (params) {
  return request({
    url: api.getTestCaseList,
    method: 'post',
    params: params
  })
}
export function updateTestCase (params) {
  return request({
    url: api.updateTestCase,
    method: 'post',
    data: params
  })
}
export function addTestCase (params) {
  return request({
    url: api.addTestCase,
    method: 'post',
    data: params
  })
}
export function deleteTestCase (params) {
  return request({
    url: api.deleteTestCase,
    method: 'post',
    params: params
  })
}
